<?
session_start();
$id = $_POST['id'];
$pw = $_POST['pw'];

$message = "unset";
if ($_SESSION['login'] == 1) {
	$message = "Already logged in";
} else if ($id == "admin" && $pw == "whoareyou") {
	$_SESSION['login'] = 1;
	$message =  "Validation success.";
} else {
	$message = "Validation fail.";
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<h1>Woodstock mailing login result: <? echo $message;?></h1>
<a href="mailing_memberlist.php">view mailing list</a>
</body>
</html>
